var FrontEnd = Class.create(enchant.Group,{
    
	// 初期化
    initialize: function() {
    	Group.call(this);
    },
	
	createGameStatusWindow:function(posx, posy){
		var unitPanel = new UnitPanel(320,32);
		this.addChild(unitPanel);
	    
		var goldLabel = new Label("Cannon:"+g_cannons.length);
		goldLabel.x =unitPanel.x + 50; goldLabel.y = unitPanel.y + 5;
		goldLabel.font = "normal normal 24px/1.0 monospace";
		this.addChild(goldLabel);
		
		var lifeLabel = new Label("Life:"+g_life);
		lifeLabel.x =unitPanel.x + 150; lifeLabel.y = unitPanel.y + 5;
		lifeLabel.font = "normal normal 24px/1.0 monospace";
		this.addChild(lifeLabel);
	
	},

	createCannonSelectWindow: function(posx, posy){
		
	},
	createCancelButton: function(posx, posy){
		
	},
	
	isSelectedCancelButton: function(e){
		
	},

	onUpdateGameStatus: function(e){
		
	},
	
	onUpdateSelectedCannon: function(e){
		
	},
	
	onMouseOverButton: function(e){
		
	},
	
	onMouseOutButton: function(e){
		
	},

	
});




/* UnitPanel */
var UnitPanel = enchant.Class.create(enchant.Sprite, {
	initialize:function(width,height){
		Sprite.call(this,width, height);
		this.image = g_game.assets[ImageFactory.getExternalImagePath('panel')];
    		this.scale(0.9, 0.8);
		this.countOfAvailableUnits = 0;
	},
	
});
